package org.tio.sitexxx.service.service.qj;

import com.jfinal.kit.Kv;
import com.jfinal.plugin.activerecord.Db;
import com.jfinal.plugin.activerecord.SqlPara;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.tio.sitexxx.service.model.main.Demo;
import org.tio.sitexxx.service.model.main.User;
import org.tio.sitexxx.service.model.main.Users;
import org.tio.sitexxx.service.vo.Const;

public class UserService {
    private static Logger log	= LoggerFactory.getLogger(UserService.class);
    public static final UserService me	= new UserService();
    final User dao	= new User().dao();
    public UserService(){

    }
    /**
     * 修改数据
     * @param loginname nicktoname
     * @return
     */
    public boolean update(String loginname,String nicktoname) {
        String sqlid = "user.updatenicktoname";
        String db = Const.Db.TIO_SITE_MAIN;
        SqlPara sqlPara = Db.use(db).getSqlPara(sqlid,nicktoname,loginname);
        System.out.println("sql:"+sqlPara.getSql());
        Db.use(db).update(sqlPara.getSql(),nicktoname,loginname);
        return true;
    }
}
